<template>
  <div class="flex w-100% relative">
    <!-- 列表，加载数据 -->
    <div class="_list"></div>
    <!-- 表单主体和渲染区 -->
    <div class="">
      <!-- 渲染区 -->
      <div v-if="type != 'setting'">
        
      </div>
      <!-- 表单区域 -->
      <div>
        <el-form :model="currentForm"  size="mini">
          <template v-for="col in column">
            <el-form-item :label="col.label">
              <component :is="formItemName(col)" v-model="currentForm[col.prop]"></component>
            </el-form-item>
          </template>
        </el-form>
      </div>
    </div>
  </div>
</template>

<script>
import box from "./box.vue";
import panel from "./panel.vue"

import {loadConfigJson} from "@/util/util"
export default {
  name:"configForm",
  compontents:{},
  props:["type"],
  data:() => ({
    currentForm:{},
    configForm:undefined,
  }),
  computed:{
    column(){
      return []
    }
  },
  methods:{
    formItemName(item){
      return "el-input"
    },
    initFormData(){},
    updateSourceData(){},
    async loadFormJson(){
      this.configForm = await loadConfigJson();
    }
  },
  created(){
    this.loadFormJson();
  }

}
</script>